﻿namespace Wolfpack.Contrib.Checks.RegistryCollector
{
    using System;
    using System.Collections.Generic;

    public class Product
    {
        public Product(string productName)
        {
            ProductName = productName;
            DetailsDictionary = new Dictionary<string, string>();
        }

        public Product()
        {
            ProductName = null;
            DetailsDictionary = new Dictionary<string, string>();
        }

        public string ProductName { get; set; }

        public Dictionary<string, string> DetailsDictionary { get; set; }

        public override bool Equals(object obj)
        {
            var obj2 = obj as Product;

            return obj2 != null && ProductName.Equals(obj2.ProductName);
        }

        public override int GetHashCode()
        {
            return Convert.ToInt32(ProductName.Substring(1));
        }
    }
}
